﻿<%@ Page Language="C#" Inherits="E.Web.Teacher.internals.publics.classes.View" %>
<%@ Import Namespace="E.Model" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
  <title>班级信息</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
  <link rel="stylesheet" href="/css/main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/t_main.css" type="text/css" media="all" />
  <link rel="stylesheet" href="/css/class.css" type="text/css" media="all" />
  <script type="text/javascript" src="/js/Common.js"></script>
  <script type="text/javascript">
    function GetUserListInClass() {
      document.getElementById("form1").action = "?act=l";
      document.getElementById("form1").submit();
    }
  </script>
  <style type="text/css">
    .d_r_n{ float:left; width:200px; }	/*姓名*/
    .d_r_e{ float:left; width:200px; }	/*Email*/
    .d_r_g{ float:left; width:125px; }	/*性别*/
    .d_r_o{ float:left; width:125px; }	/*操作*/
  </style>
</head>
<body>
  <form id="form1" action="" method="post">
    <div class="m_top"></div>
    <div class="block_2">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;班级信息</div>
      </div>
      <div class="spe_line_2"></div>
      <div class="box_1">
        <div class="fl tr left">班级编号：</div>
        <div class="fl dis_r"><%=model.ClassCode%></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">当前人数：</div>
        <div class="fl dis_r"><%=count %>&nbsp;&nbsp;<a href="javascript:GetUserListInClass();"><strong>点击查看学员列表</strong></a></div>
      </div>
      <div class="box_1">
        <div class="fl tr left">项目及课程：</div>
        <div class="fl dis_r"><%=model.ProjectName%>--<%=model.CourseName %></div>
      </div>
      <div style="width:350px; margin-top:20px; text-align:center;">
        <a href="/internals/publics/classes/Edit.aspx?act=u&id=<%=id %>"><img alt="" src="/images/btn/edit.gif" /></a>
        &nbsp;&nbsp;<a href="/internals/publics/classes/List.aspx"><img alt="" src="/images/btn/back.gif" /></a>
        <input type="hidden" id="act" name="act" value="<%=act %>" />
        <input type="hidden" id="id" name="id" value="<%=id %>" />
      </div>
    </div>
    <% if (act == "l") { %>
    <div class="block">
      <div style="width:650px; height:22px;">
        <div class="title">&nbsp;学员列表</div>
      </div>
      <div class="spe_line_2"></div>
      
    <% if (userList != null && userList.Count > 0) { %>
    
      <div id="datatable">
        <div class="data_rows" style="font-weight:bolder;">
          <div class="d_r_n">姓名</div>
          <div class="d_r_e">Email</div>
          <div class="d_r_g">性别</div>
          <div class="d_r_o">操作</div>
        </div>
        
        <% foreach (UserListModel listModel in userList) { %>
        <div class="data_rows">
          <div class="d_r_n"><%=listModel.UserName.Equals("") ? "&nbsp;" : listModel.UserName%></div>
          <div class="d_r_e"><%=listModel.Email.Equals("") ? "&nbsp;" : listModel.Email%></div>
          <div class="d_r_g"><%=listModel.Gender ? "男" : "女"%></div>
          <div class="d_r_o"><a href="/student/View.aspx?id=<%=listModel.ID %>">查看</a></div>
        </div>
        <% } %>
        
      </div>
      
    <% } else { %>
    <% } %>
    
    </div>
    
    <% } %>
  </form>
</body>
</html>
